package com.mg.plugin.cropgrow.entity;

import java.util.List;

import com.mg.plugin.cropgrow.calculator.PlantType;

public class CropGrowData {
    private String plantType;

    private String year;

    private String stationNum;
    private String stationName;
    private String stationCity;
    private String cropType;

    //当量积温
    private double equAccTemp;
    //插播日期
    private String plantDay;
    //插播叶数
    private double cropLeafCount;
    private double leaf12;
    private double leaf30;
    //揭膜期
    private double leafFU;
    //膜效应
    private double filmEffect;
    //订正中值
    private double correctValue;
    //订正值TS
    private double correctTSValue;
    //插秧始期
    private double riceTrans;
    //分蘖始期
    private double tiller;
    private double leaf37;
    //失叶始期
    private double lastLeaf;
    private double leaf66;
    //有效分蘖
    private double validTiller;
    //幼穗始期
    private double youngEar;
    //止叶期
    private double endLeaf;
    //出穗始期
    private double earStage;
    //灌浆长度
    private double groutLength;
    //始积温度
    private double beginAccTemp;
    //适温指标
    private double fitTempTarget;
    //始末天数
    private double dayOfEnd;
    //高峰系数
    private double peakRatio;
    //37-66叶期平均温度
    private double tp;
    private double argoYield;

    List<StationData> stationDataList;

    public CropGrowData(StationData tmp, int year, PlantType plantType) {

        this.year = String.valueOf(year);
        this.stationNum = tmp.getStationNum();
        this.stationName = tmp.getStationName();
        this.stationCity = tmp.getStationCity();
        if (plantType == PlantType.A) {
            this.plantType = "A";
        } else {
            this.plantType = "B";
        }
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getStationNum() {
        return stationNum;
    }

    public void setStationNum(String stationNum) {
        this.stationNum = stationNum;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getStationCity() {
        return stationCity;
    }

    public void setStationCity(String stationCity) {
        this.stationCity = stationCity;
    }

    public String getCropType() {
        return cropType;
    }

    public void setCropType(String cropType) {
        this.cropType = cropType;
    }

    public double getEquAccTemp() {
        return equAccTemp;
    }

    public void setEquAccTemp(double equAccTemp) {
        this.equAccTemp = equAccTemp;
    }

    public String getPlantDay() {
        return plantDay;
    }

    public void setPlantDay(String plantDay) {
        this.plantDay = plantDay;
    }

    public double getCropLeafCount() {
        return cropLeafCount;
    }

    public void setCropLeafCount(double cropLeafCount) {
        this.cropLeafCount = cropLeafCount;
    }

    public double getLeaf12() {
        return leaf12;
    }

    public void setLeaf12(double leaf12) {
        this.leaf12 = leaf12;
    }

    public double getLeaf30() {
        return leaf30;
    }

    public void setLeaf30(double leaf30) {
        this.leaf30 = leaf30;
    }

    public double getLeafFU() {
        return leafFU;
    }

    public void setLeafFU(double leafFU) {
        this.leafFU = leafFU;
    }

    public double getFilmEffect() {
        return filmEffect;
    }

    public void setFilmEffect(double filmEffect) {
        this.filmEffect = filmEffect;
    }

    public double getCorrectValue() {
        return correctValue;
    }

    public void setCorrectValue(double correctValue) {
        this.correctValue = correctValue;
    }

    public double getCorrectTSValue() {
        return correctTSValue;
    }

    public void setCorrectTSValue(double correctTSValue) {
        this.correctTSValue = correctTSValue;
    }

    public double getRiceTrans() {
        return riceTrans;
    }

    public void setRiceTrans(double riceTrans) {
        this.riceTrans = riceTrans;
    }

    public double getTiller() {
        return tiller;
    }

    public void setTiller(double tiller) {
        this.tiller = tiller;
    }

    public double getLeaf37() {
        return leaf37;
    }

    public void setLeaf37(double leaf37) {
        this.leaf37 = leaf37;
    }

    public double getLastLeaf() {
        return lastLeaf;
    }

    public void setLastLeaf(double lastLeaf) {
        this.lastLeaf = lastLeaf;
    }

    public double getLeaf66() {
        return leaf66;
    }

    public void setLeaf66(double leaf66) {
        this.leaf66 = leaf66;
    }

    public double getValidTiller() {
        return validTiller;
    }

    public void setValidTiller(double validTiller) {
        this.validTiller = validTiller;
    }

    public double getYoungEar() {
        return youngEar;
    }

    public void setYoungEar(double youngEar) {
        this.youngEar = youngEar;
    }

    public double getEndLeaf() {
        return endLeaf;
    }

    public void setEndLeaf(double endLeaf) {
        this.endLeaf = endLeaf;
    }

    public double getEarStage() {
        return earStage;
    }

    public void setEarStage(double earStage) {
        this.earStage = earStage;
    }

    public double getGroutLength() {
        return groutLength;
    }

    public void setGroutLength(double groutLength) {
        this.groutLength = groutLength;
    }

    public double getBeginAccTemp() {
        return beginAccTemp;
    }

    public void setBeginAccTemp(double beginAccTemp) {
        this.beginAccTemp = beginAccTemp;
    }

    public double getFitTempTarget() {
        return fitTempTarget;
    }

    public void setFitTempTarget(double fitTempTarget) {
        this.fitTempTarget = fitTempTarget;
    }

    public double getDayOfEnd() {
        return dayOfEnd;
    }

    public void setDayOfEnd(double dayOfEnd) {
        this.dayOfEnd = dayOfEnd;
    }

    public double getPeakRatio() {
        return peakRatio;
    }

    public void setPeakRatio(double peakRatio) {
        this.peakRatio = peakRatio;
    }

    public String getPlantType() {
        return plantType;
    }

    public void setPlantType(String plantType) {
        this.plantType = plantType;
    }

    public List<StationData> getStationDataList() {
        return stationDataList;
    }

    public void setStationDataList(List<StationData> stationDataList) {
        this.stationDataList = stationDataList;
    }

    public double getTp() {
        return tp;
    }

    public void setTp(double tp) {
        this.tp = tp;
    }

    public double getArgoYield() {
        return argoYield;
    }

    public void setArgoYield(double argoYield) {
        this.argoYield = argoYield;
    }

    @Override
    public String toString() {
        if (plantType.equals("A")) {
            return year + "/" + stationNum +
                    "," + year +
                    "," + stationNum +
                    "," + stationName +
                    "," + stationCity +
                    "," + cropType +
                    "," + equAccTemp +
                    "," + plantDay +
                    "," + cropLeafCount +
                    "," + leaf12 +
                    "," + leaf30 +
                    "," + leafFU +
                    "," + filmEffect +
                    "," + correctValue +
                    "," + correctTSValue +
                    "," + riceTrans +
                    "," + tiller +
                    "," + leaf37 +
                    "," + lastLeaf +
                    "," + leaf66 +
                    "," + validTiller +
                    "," + youngEar +
                    "," + endLeaf +
                    "," + earStage +
                    "," + groutLength +
                    "," + beginAccTemp +
                    "," + fitTempTarget +
                    "," + dayOfEnd +
                    "," + peakRatio +
                    "," + tp +
                    "," + argoYield;
        }
        return year + "/" + stationNum +
                "," + year +
                "," + stationNum +
                "," + stationName +
                "," + stationCity +
                "," + cropType +
                "," + equAccTemp +
                "," + plantDay +
                "," + cropLeafCount +
                "," + leaf12 +
                "," + leaf30 +
                "," + correctValue +
                "," + correctTSValue +
                "," + tiller +
                "," + leaf37 +
                "," + lastLeaf +
                "," + leaf66 +
                "," + validTiller +
                "," + youngEar +
                "," + endLeaf +
                "," + earStage +
                "," + groutLength +
                "," + beginAccTemp +
                "," + fitTempTarget +
                "," + dayOfEnd +
                "," + peakRatio +
                "," + tp +
                "," + argoYield;
    }

}
